var vm = new Vue({
    el: "#app",
    data:{
        countDown: '发送验证码', // 发送验证码按钮上的提示文字
        disabled: false, // 控制发送验证码按钮是否能够被点击，false可以被点击，true不能被点击
    },
    methods: {
        // 点击确认按钮，提示已重置支付密码成功
        confirmBtn: function(){
            swal({
                title: "已重置支付密码成功",
                timer: 1000,
                button: false
            }).then(function(){
                // window.location.href='./login.html';
            });
        },

        // 获取验证码
        getCheckCode:function(){
            this.disabled = true;
            var num = 59;
            this.countDown = 60;
            var that = this;
            var timer = setInterval(function(){
                that.countDown = num--;
                if(that.countDown == 0){
                    that.countDown = "发送验证码";
                    that.disabled = false;
                    clearInterval(timer);
                }
            }, 1000);
        },
    },
});